package com.piggy.logi.sys.bo;

import com.piggy.common.core.web.domain.BaseTenantEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 运单设置编辑对象 logi_sys_order_set
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel("运单设置编辑对象")
public class LogiSysOrderSetEditBo extends BaseTenantEntity {

    /** id */
    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("运单编号规则")
    private List<NoRuleSet> noRuleSet;

    @ApiModelProperty("运单详情设置")
    private DetailSet detailSet;

    @ApiModelProperty("开单页设置")
    private OpenOrderSet openOrderSet;

    @ApiModelProperty("货物保价设置")
    private InsuranceSet insuranceSet;

    @ApiModelProperty("代收服务费设置")
    private ServiceFeeSet serviceFeeSet;

    @Data
    public static class NoRuleSet {

        @ApiModelProperty("运单编号规则类型")
        private Integer noRuleType;

        @ApiModelProperty("运单编号头字母")
        private String noRuleFirstLetter;

        @ApiModelProperty("运单编号1的最小数字")
        private String noRule1MinNum;

        @ApiModelProperty("运单编号1的最大数字")
        private String noRule1MaxNum;

        @ApiModelProperty("运单编号4的初始数字")
        private String noRule4InitNum;

        @ApiModelProperty("当前选项")
        private String isCurrent;
    }

    @Data
    public static class DetailSet {

        @ApiModelProperty("运单编号规则类型")
        private String waybill;

        @ApiModelProperty("调度信息")
        private String dispatch;

        @ApiModelProperty("短驳记录")
        private String shuttle;

        @ApiModelProperty("签收信息")
        private String sign;

        @ApiModelProperty("提货信息")
        private String pickup;

        @ApiModelProperty("配载车辆")
        private String vehicle;

        @ApiModelProperty("中转信息")
        private String transfer;

        @ApiModelProperty("财务信息")
        private String finance;

    }

    @Data
    public static class OpenOrderSet {

        @ApiModelProperty("发站不允许修改")
        private String allowModifyOrigin;

        @ApiModelProperty("发站与到站必须选择行政区范围")
        private String administrativeRegionRange;

        @ApiModelProperty("启用地图选点")
        private String enableMapSelection;

        @ApiModelProperty("开启地图和目的网点信息")
        private String enableMapAndDestination;

         @ApiModelProperty("只能选择路由节点到达")
        private String onlyRouteNodeArrival;

        @ApiModelProperty("到站不关联上级行政区")
        private String associateSuperiorAdministrativeRegion;

        @ApiModelProperty("一个运单可关联多个订单")
        private String associatedOrderCount;

        @ApiModelProperty("运单3天自动完成")
        private String autoCompleteTime;

    }

    @Data
    public static class InsuranceSet {

        @ApiModelProperty("货值范围起始值（元）")
        private String minValue;

        @ApiModelProperty("货值范围结束值（元）")
        private String maxValue;

        @ApiModelProperty("保价费率（‰）")
        private String insuranceRate;

        @ApiModelProperty("最低保价金额（元）")
        private String minInsuranceAmount;

        @ApiModelProperty("最高保价金额（元）")
        private String maxInsuranceAmount;

    }

    @Data
    public static class ServiceFeeSet {

        @ApiModelProperty("服务费费率")
        private String serviceFeeRate;

        @ApiModelProperty("代收费范围起始值")
        private String minCollectionFee;

        @ApiModelProperty("代收费范围结束值")
        private String maxCollectionFee;

    }
}